package com.hwang.demo3.practice;

public class 数组 {
    public static void main(String[] args) {
        int[] arr = new int[5];
        System.out.println(arr); //[I@1b6d3586
        for(int i=0;i<5;i++){
            System.out.println(arr[i]);
        }

        char[] c_arr = {'a', 'b', 'c'};
        System.out.println(c_arr);
        for (int i=0;i<3;i++){
            System.out.println(c_arr[i]);
        }

        int[] array = new int[5];
        array[0] = 1;
        array[1] = 2;
        array[3] = 5;
        array[2] = 3;
        array[4] = 7;
        System.out.println(array);
        for(int i=0;i<5;i++){
            System.out.println(array[i]);
        }

        char[] c_array = {'a', 'b', 'c'};
        c_array[1] = 'T';
        c_array[2] = 'q';
        System.out.println(c_array);
        for (int i=0;i<3;i++){
            System.out.println(c_array[i]);
        }
    }
}
